from flask import Flask
from application.controllers import all_bp


def create_app():
    """create FLask app"""
    app = Flask(__name__)

    # register components
    register_blueprint(app)

    return app


def register_blueprint(app):
    """register blueprint to app"""
    for bp in all_bp:
        app.register_blueprint(bp)



